package com.comm.enums;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * @author mis_wu
 * @date 2022/6/19 16:16
 * @todo sentinel异常信息
 */
@AllArgsConstructor
@NoArgsConstructor
public enum SentinelErrorEnum {
    SERVE_LIMIT(429,"请求过快,服务限流"),
    SERVE_CIRCUIT(430,"请求异常,服务熔断"),
    SERVE_HOT_LIMIT(431,"请求异常,热点限流"),
    SERVE_SELF_ADAPTIVE_LIMIT(432,"请求异常,系统自适应限流"),
    SERVE_NO_AUTHORITY(433,"请求异常,没有授权"),
    ;
    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
